<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Sugar</title>
</head>

<body>
  <script>
    // 这些都是伪代码，主要目的是方便大家理解
    // 类
    class MyVue {
      constructor() {
        this.name = '假的Vue文件'
        this.$abc = '这是Vue的东西'
      }
      sayHi() {
        console.log('你好' + this.name);
      }
    }


    const Toast = () => {
      alert('这是VantUI的轻提示')
    }
    // Vue.use() 底层
    MyVue.prototype.$toast = Toast

    // const vm = new MyVue()

    class MyVueComponent extends MyVue {
      constructor() {
        super()
        this.data = { aa: 11 }
      }
      aa() {
        this.$toast()
      }
    }


    // console.log(vm);
    const vmCom = new MyVueComponent()

    // console.log(vmCom);
    // vmCom.aa()



  </script>
</body>

</html>